const state = {
    money: 10
}

const mutations = {
    add(state, param) {
        //window.console.log(param)
        state.money += param
    },
    reduce(state) {
        state.money--
    }
}

const actions = {
    add: ({ commit }, param) => {
        commit('add', param)
    },
    reduce: ({ commit }) => {
        commit('reduce')
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}